package ie.dkit.java3Demulation.objects;

import java.util.Vector;

public class PointGroup extends Vector<Point> implements GraphicsObject {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8279958366010325048L;

	private String name;

	public void setCoordinates(Point point) {
		for (Point p : this) {
			p.setCoordinate(point);
		}
	}

	public void addToPoint(double x, double y) {
		for (Point p : this) {
			p.setX(p.getX() + x);
			p.setY(p.getY() + y);
		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see ie.dkit.java3Demulation.objects.GraphicsObject#getName()
	 */
	public String getName() {
		return name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see ie.dkit.java3Demulation.objects.GraphicsObject#setName(java.lang.String)
	 */
	public void setName(String name) {
		this.name = name;
	}
}
